package com.dongdongshop.dao.item_jpa;

import com.dongdongshop.pojo.item.TbItem;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;

import java.util.List;
public interface ItemJpaDao extends JpaSpecificationExecutor<TbItem>, JpaRepository<TbItem,Long> {
    public List<TbItem> findAllByGoodsId(Long goodsId);
    @Query(value = "from TbItem where id = ?1")
    TbItem getItemByItemId(Long itemId);
}
